<%@ page contentType="text/html; charset=UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>

<%
	//test push
	String cookieName = "AirportUser";
	Cookie cookies[] = request.getCookies();
	String username = null;
	if (cookies != null) {
		for (int i = 0; i < cookies.length; i++) {
			if (cookies[i].getName().equals(cookieName)) {
				username = cookies[i].getValue();
				break;
			}
		}
	}
%>
	<title>Airport Traveler App | CSE 5911 Project AU12</title>
 <!--[if IE]>
	<link rel="stylesheet" type="text/css" href="ie.css" />
	
<![endif]-->
	

<link rel="stylesheet" media="screen and (min-device-width: 800px)" href="full_style.css" />
<link rel='stylesheet' media='screen and (min-width: 300px) and (max-width: 799px)' href='mobile_style.css' />
<html>
	<center>
  
<header> 
<![if ! IE]>

<table width="100%">
		<tr>
		<td width="35%"><a href="<s:url action = "index"/>"><img width="100%" src="images/logo.png" border="0"></a></td>

		<td width="65%"><p align="right">
		<table><tr>
		<td><a href="<s:url action="flightTimes"/>"><img width="100%" src="images/flight_times.png" border="0"></a><br><a href="<s:url action="terminalMap"/>"><img width="100%" src="images/terminal_maps.png" border="0"></a></td>
		
		</tr></table>
		</p>
		</td>
		</tr>

		<tr><td valign="top">
		<% if (username != null) { %>
		Hello, <a href="<s:url action="viewprofile"/>"><s:property value="username"/></a> ! 
		<%;} else { %>
		You are not logged in. <a href="signup.jsp">Log in.</a> | <a href="signup.jsp">Click Here to Signup!</a>
		<%;} %>
		</td><td align="right">
	
		 <%if (username != null) { %> <a href="logout">Logout</a> <%; } %>
		</tr></td></table> 
		</p>
<![endif]>

 <!--[if IE]>
		<table width="100%" style="background-color: #80B2FF;">
		<tr>
		<td width="35%"><a href="<s:url action = "index"/>"><img src="images/logo.png" border="0"></a></td>

		<td width="65%"><p align="right">
		<table><tr>
		<td><a href="flight_times.jsp"><img src="images/flight_times.png" border="0"></a><br><a href="terminal_maps.jsp"><img src="images/terminal_maps.png" border="0"></a></td>
		
		</tr></table>
		</p>
		</td>
		</tr>

		<tr><td valign="top">
		<% if (username != null) { %>
		Hello, <a href="<s:url action="viewprofile"/>"><s:property value="username"/></a> ! 
		<%;} else { %>
		You are not logged in. <a href="signup.jsp">Log in.</a> | <a href="signup.jsp">Click Here to Signup!</a>
		<%;} %>
		</td><td align="right">
	
		 <%if (username != null) { %> <a href="logout">Logout</a> <%; } %>
		</tr></td></table> 
		</p>

		
<![endif]-->
    
		
		
	</header>	


	<div>
		<%
			if (username != null) {
		%>
		<table>
			<tr>
				<td><b><s:property value="username" />'s</b> Profile:
					<hr> User Name: <s:property value="username" /><a
					href="changepw.jsp"><font size="1"> Change Password</font></a><br>
					Email Address: <s:property value="email" /> <a
					href="changemail.jsp"><font size="1"> Change Email
							Address</font></a><br> <s:form action="updateprofile">
						<s:radio label="Gender" name="gender" list="{'male','female'}" />
						<!--  
	<s:textfield label = "Birthday (yyyy-MM-dd)" name="birthdayStr" key = "birthdayStr"/> -->
						<s:select label="Age" name="age" headerKey="1"
							headerValue="--Select Age--" list="{
'18',
'19',
'20',
'21',
'22',
'23',
'24',
'25',
'26',
'27',
'28',
'29',
'30',
'31',
'32',
'33',
'34',
'35',
'36',
'37',
'38',
'39',
'40',
'41',
'42',
'43',
'44',
'45',
'46',
'47',
'48',
'49',
'50',
'51',
'52',
'53',
'54',
'55',
'56',
'57',
'58',
'59',
'60',
'61',
'62',
'63',
'64',
'65',
'66',
'67',
'68',
'69',
'70',
'71',
'72',
'73',
'74',
'75',
'76',
'77',
'78',
'79',
'80',
'81',
'82',
'83',
'84',
'85',
'86',
'87',
'88',
'89',
'90',
'91',
'92',
'93',
'94',
'95',
'96',
'97',
'98',
'99',
'100'}" />
						<s:select label="Occupation" name="occupation" headerKey="1"
							headerValue="--Select Occupation--"
							list="{
'Account Executive', 
'Account Manager', 
'Accountant', 
'Accounts Assistant', 
'Administrator', 
'Analyst', 
'Architect', 
'Assistant', 
'Associate', 
'Auditor', 
'Barrister', 
'Business Analyst', 
'Buyer', 
'CEO', 
'CFO', 
'CIO', 
'Conference', 
'Consultant', 
'Credit Controller', 
'Dentist', 
'Design Engineer', 
'Designer', 
'Director', 
'Doctor', 
'Driver', 
'Editor', 
'Electrician', 
'Engineer', 
'Finance Director', 
'Financial Analyst', 
'Financial Controller', 
'Graduate', 
'Graphic Designer', 
'Hr Administrator', 
'Hr Advisor', 
'Journalist', 
'Lawyer', 
'Lecturer', 
'Manager', 
'Managing Director', 
'Marketing Assistant', 
'Marketing Director', 
'Marketing Executive', 
'Mechanical Engineer', 
'Nurse', 
'Operations Director', 
'Orthodonist', 
'Personal Assistant', 
'Pharmacist', 
'Physician', 
'Pediatrician', 
'Pilot', 
'Plumber', 
'President', 
'Product Manager', 
'Professor', 
'Programmer', 
'Project Engineer', 
'Project Manager', 
'Quantity Surveyor', 
'Receptionist', 
'Recruiter', 
'Researcher', 
'Sales', 
'Sales Assistant', 
'Sales Director', 
'Sales Executive', 
'Sales Manager', 
'Scientist', 
'Secretary', 
'Social Worker', 
'Software Developer', 
'Software Engineer', 
'Solicitor', 
'Sports', 
'Sports Journalist', 
'Supervisor', 
'Teacher', 
'Technology', 
'Team Leader', 
'Technician', 
'Trader', 
'Trainer', 
'Undergraduate Student', 
'Vice President', 
'Web Designer', 
'Web Developer', 
'Sports Doctor',
'Other'
							}" />
						<s:select label="Travel Reason" name="travelReason" headerKey="1"
							headerValue="--Select Travel Reason--" value="travelReason"
							list="{
								'Business',
								'Conference',
								'Event',
								'Honeymoon',
								'Medical',
								'Meeting',
								'Moving',
								'School',
								'Sports',
								'Tourism',
								'Vacation',
								'Other'
								}" />
						<s:submit value="update" />
					</s:form> <img width="100" height="100" src="<s:property value="avatar"/>" />
					<a href="changeimg"><font size="1">Change Image</font></a> <br>
					Inbox(<a href="<s:url action = "displayPMList"/>"><s:property value="unreadCount"/>/<s:property value="totalPMCount"/></a>)
			</tr>
			</td>
		</table>
		<%
			;
			} else {
		%>
		You are not logged in, <a href="signup.jsp">Click Here to Signup!</a>
		<%
			;
			}
		%>
	</div>

	<footer>
		<font size="1"> About Us | Contact Us | Help | FAQ | ? 2012 </font>

	</footer>
</center>
</html>
